package FlowGram.Application.IDEWindow;

import java.awt.Component;
import java.awt.Dialog;
import java.awt.Font;
import java.awt.Frame;
import java.awt.GraphicsConfiguration;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
/**
 * 
 * @author thackray
 *
 */
public class AboutDialog extends JDialog {



	public AboutDialog(Frame owner) {
		super(owner, "About FlowGram", true);
		
		this.setSize(500, 300);
		
		JPanel pane = new JPanel();
		pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
		
		pane.add(new JLabel(" "));//spacer
		
		JLabel title = new JLabel("FlowGram Integrated Development Environment");
		title.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 18));
		title.setAlignmentX(Component.CENTER_ALIGNMENT);
		pane.add(title);
		
		pane.add(new JLabel(" "));//spacer
		
		JLabel version = new JLabel("version 1.0.0");
		version.setFont(version.getFont().deriveFont(Font.ITALIC));
		version.setAlignmentX(Component.CENTER_ALIGNMENT);
		pane.add(version);
		
		pane.add(new JLabel(" "));//spacer
		
		JLabel authors = new JLabel("Authors:");
		authors.setFont(authors.getFont().deriveFont(Font.BOLD));
		authors.setAlignmentX(Component.CENTER_ALIGNMENT);
		pane.add(authors);
		
		JLabel author1 = new JLabel("Josh Thackray");
		author1.setAlignmentX(Component.CENTER_ALIGNMENT);
		pane.add(author1);
		
		JLabel author2 = new JLabel("Oscar A. Pena");
		author2.setAlignmentX(Component.CENTER_ALIGNMENT);
		pane.add(author2);
		
		JLabel author3 = new JLabel("Rushi Amin");
		author3.setAlignmentX(Component.CENTER_ALIGNMENT);
		pane.add(author3);
		
		JLabel author4 = new JLabel("Eric Tsai");
		author4.setAlignmentX(Component.CENTER_ALIGNMENT);
		pane.add(author4);
		
		JLabel author5 = new JLabel("Sonilaure Cineus");
		author5.setAlignmentX(Component.CENTER_ALIGNMENT);
		pane.add(author5);
		

		pane.add(new JLabel(" "));//spacer
		
		JButton okButton = new JButton("OK");
		okButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				AboutDialog.this.setVisible(false);
			}
		});
		okButton.setSize(100, okButton.getHeight());
		okButton.setAlignmentX(Component.CENTER_ALIGNMENT);
		pane.add(okButton);
		
		this.setContentPane(pane);
		
		//Display the window.
        this.pack();
        this.setVisible(true);
	}

}
